package com.timguan.render.api.api.backend;

import com.timguan.render.api.entity.cms.CMSResourceConfig;
import net.pocrd.entity.ServiceException;

import java.util.List;
import java.util.Map;

/**
 * 根据pageconfig定制page
 * Created by guankaiqiang on 2015/3/18.
 */
public interface CMSPageService {
    /**
     * Map<String, List<List<Map<String, Object>>>>
     * Map<String, List<List<Map<String, Object>>>>====>key:placeHolder,value:module
     * List<List<Map<String, Object>>>====>value:module对应的subModuleList
     * List<Map<String, Object>>====>value:subModule中填充的data
     * Object为processor的处理结果
     */
    public Map<String, List<List<Object>>> getDataOfPage(int pageId, int appId) throws ServiceException;

    /**
     * 获取头尾片段
     *
     * @param pageId
     * @throws ServiceException
     */
    public List<CMSResourceConfig> getResourceConfigsOfPage(int pageId) throws ServiceException;
}
